# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1046.15.64 -> 1.1046.15.65 # drivers/net/tg3.c 1.68 -> 1.68.1.1 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/06/10 rmk@flint.arm.linux.org.uk 1.1046.262.1 # Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5 # into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-pcmcia # -------------------------------------------- # 03/06/10 linux@de.rmk.(none) 1.1046.262.2 # [PCMCIA] Move socket_info_t # # This patch introduces "struct pcmcia_socket" which is 100% equal to # the "socket_info_t" defined previously in drivers/pcmcia/cs_internal.h # # Unfortunately, a few other definitons need to be moved as well. # # drivers/pcmcia/cs.c | 4 - # drivers/pcmcia/cs_internal.h | 73 --------------------------------- # include/pcmcia/ss.h | 94 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 97 insertions(+), 74 deletions(-) # -------------------------------------------- # 03/06/10 linux@de.rmk.(none) 1.1046.262.3 # [PCMCIA] Move get_socket_info_by_nr # # This adds a list of all pcmcia sockets which will replace the current # table-based approach. Also, ds.c now relies on cs.c to get the proper # "struct pcmcia_bus_socket *" for the corresponding socket number. # -------------------------------------------- # 03/06/10 linux@de.rmk.(none) 1.1046.262.4 # [PCMCIA] Remove socket_table # # This patch removes the socket_table from cs.c and friends. # # bulkmem.c | 2 - # cs.c | 83 ++++++++++++++++++++++++---------------------------------- cs_internal.h | 7 ++-- # ds.c | 2 - # rsrc_mgr.c | 10 ++++-- # 5 files changed, 46 insertions(+), 58 deletions(-) # -------------------------------------------- # 03/06/10 davidm@tiger.hpl.hp.com 1.1046.15.65 # Clean up tg3 driver to avoid relying on PCI-DMA implementation internals. This removes code and gets # rid of the (incorrect) dependence on PCI_DMA_BUS_IS_PHYS. # -------------------------------------------- # diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c Mon Sep 22 13:00:38 2003 +++ b/drivers/net/tg3.c Mon Sep 22 13:00:38 2003 @@ -2234,73 +2234,17 @@ schedule_work(&tp->reset_task); } -#if !PCI_DMA_BUS_IS_PHYS -static void tg3_set_txd_addr(struct tg3 *tp, int entry, dma_addr_t mapping) -{ - if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) { - struct tg3_tx_buffer_desc *txd = &tp->tx_ring[entry]; - - txd->addr_hi = ((u64) mapping >> 32); - txd->addr_lo = ((u64) mapping & 0xffffffff); - } else { - unsigned long txd; - - txd = (tp->regs + - NIC_SRAM_WIN_BASE + - NIC_SRAM_TX_BUFFER_DESC); - txd += (entry * TXD_SIZE); - - if (sizeof(dma_addr_t) != sizeof(u32)) - writel(((u64) mapping >> 32), - txd + TXD_ADDR + TG3_64BIT_REG_HIGH); - - writel(((u64) mapping & 0xffffffff), - txd + TXD_ADDR + TG3_64BIT_REG_LOW); - } -} -#endif - static void tg3_set_txd(struct tg3 *, int, dma_addr_t, int, u32, u32); static int tigon3_4gb_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb, u32 guilty_entry, int guilty_len, u32 last_plus_one, u32 *start, u32 mss) { + struct sk_buff *new_skb = skb_copy(skb, GFP_ATOMIC); dma_addr_t new_addr; u32 entry = *start; int i; -#if !PCI_DMA_BUS_IS_PHYS - /* IOMMU, just map the guilty area again which is guaranteed to - * use different addresses. - */ - - i = 0; - while (entry != guilty_entry) { - entry = NEXT_TX(entry); - i++; - } - if (i == 0) { - new_addr = pci_map_single(tp->pdev, skb->data, guilty_len, - PCI_DMA_TODEVICE); - } else { - skb_frag_t *frag = &skb_shinfo(skb)->frags[i - 1]; - - new_addr = pci_map_page(tp->pdev, - frag->page, frag->page_offset, - guilty_len, PCI_DMA_TODEVICE); - } - pci_unmap_single(tp->pdev, pci_unmap_addr(&tp->tx_buffers[guilty_entry], - mapping), - guilty_len, PCI_DMA_TODEVICE); - tg3_set_txd_addr(tp, guilty_entry, new_addr); - pci_unmap_addr_set(&tp->tx_buffers[guilty_entry], mapping, - new_addr); - *start = last_plus_one; -#else - /* Oh well, no IOMMU, have to allocate a whole new SKB. */ - struct sk_buff *new_skb = skb_copy(skb, GFP_ATOMIC); - if (!new_skb) { dev_kfree_skb(skb); return -1; @@ -2337,7 +2281,6 @@ } dev_kfree_skb(skb); -#endif return 0; }